<?php
$dis_id=1;
include("../../inc/conn.inc");
include("../islogin.php");

if($_POST[act]=="ok2"){
   @mysql_query("update member set m_rz_img='$_POST[picture]',m_rz='1',m_rz_ok='2' where id='".$_COOKIE['user_id']."'");
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员中心-三帝贸易网</title>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript" src="../js/left.js"></script>
<body>
<div id="mian">
<?php include("../inc/top.php");?>
<div class="top1"><span>您当前位置：<a href="../index.php" class="dh">会员助手</a> &gt;&gt; 会员认证</span></div>
<div class="left">
<?php include("../inc/left.php");?>
</div>
<div class="right">
<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
   <TR>
     <TD height="40" bgcolor="#EFF6FF" style="font-size:18px;font-weight:bold;padding-left:8px;">会员认证</TD>
   </TR>
</TABLE>
<br>
<br>
<br>
    <?php
	$rs=mysql_query("select id,m_rz,m_rz_img,m_rz_ok,m_rz_shuoming,m_cl from member where id='".$_COOKIE['user_id']."'");
	$row=mysql_fetch_array($rs);
	?>
      <TABLE width="100%" border="0" cellPadding="0" cellSpacing="0" bgcolor="#EEEEEE">
        <TR>
          <TD bgcolor="#FFFFFF">
            <TABLE width="100%" border="0" cellpadding="0" cellSpacing="1" bgcolor="#C1DCF5">
              <TBODY><form method="post" action="" name="form1" onSubmit="return checkimg()">
			  <TR>
                  <TD colspan="2" height="40" bgcolor="#EFF6FF" style="padding-left:5px;color:#FF0000;">注：请上传公司营业执照或者联系人身份证(营业执照和注册公司名称保持一致，联系人和身份证保持一致，否则审核不通过)。</TD>
               </TR>
                <TR>
                  <td width="26%" height="30" align="center" bgcolor="#EFF6FF">认证图片</td>
                  <TD width="74%" bgcolor="#F9F9F9" style="padding-left:3px;">
				  <?php if($row["m_rz_img"]){?><img src="http://img.sandib2b.cn/<?=$row[m_rz_img]?>" width="500" height="400" border="0" <?=imgstr("http://img.sandib2b.cn/$row[m_rz_img]","120","120")?>/>
                  <br>
                  <br>
                  <?php if($row["m_rz_ok"]=="1"){?>
				  认证成功
                  <?php }else if($row["m_rz_ok"]==2){?>
                    营业执照正在审核中...
                     <?php }else{?>
                        <?php if($row[m_cl]){?>
                        <span style="color:red;font-size:14px;"><?=$row[m_rz_shuoming]?></span>
                        <?php }?>
                    <?php }?>
                  <br>
                  <br>
                <?php }?>
                  <?php if(!$row[m_rz_ok]){?><input name="picture" type="text" size="35" value="" id="picture">&nbsp;&nbsp;<input name="button" type="button" onClick="window.open ('../upfile.php', 'newwindow', 'height=50, width=400, top=250, left=250, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')" value="上传图片"> <input type="button" onClick="window.open ('/member/photo/info.php', 'newwindow', 'height=500, width=600, top=0, left=250, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no')" value="选择已上传的图片"><?php }?></TD>
                </TR>
                <TR>
                  <td height="30" align="center" bgcolor="#EFF6FF">&nbsp;</td>
                  <TD bgcolor="#F9F9F9"><?php if(!$row[m_rz_ok]){?><input name="submit" type="submit" value=" 提 交 ">
                  <input type="hidden" name="act" value="ok2"><?php }?></TD>
                </TR></form>
              </TBODY>
          </TABLE></TD>
        </TR>
      </TABLE>
</div>
<div class="onl"></div>
<?php include("../inc/foot.php");
?>
</div>
</body>
</html>
<script language="javascript">
function $(id){
return document.getElementById(id);
}
function checkimg(){
if($("picture").value==""){
alert("请上传图片");
$("picture").focus();
return false;
}
}
</script>
